#include "Diagnosis.h"
#include "stdarg.h"
#include <iostream>

void DiagErr(std::string_view code, int col, const char *fmt, ...) {
    va_list args;
    va_start(args, fmt);

    std::cerr << code << std::endl;
    fprintf(stderr, "%*s^", col, "");
    vfprintf(stderr, fmt, args);
    fprintf(stderr, "\n");

    va_end(args);
    exit(0);
}